<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象的解构</title>
</head>
<body>
    <script>
        obj = {
            name: '张三',
            age: 18,
            gender: '男',
            }
              
            //es5对象解构赋值
    var name = obj.name;
    var age = obj.age;
    var gender = obj.gender;
    console.log(name,age,gender);

    //es6对象解构赋值
    let{gender,age,name} =Object 
      console.log(gender,age,name);
    </script>

</script>
</body>
</html>